package java_objects.static_modifier;

public class CoffeeCup{
	
	static int nCups = 0;
	static String logo;
	int cupNumber;
	String flavor;
	
	CoffeeCup (String f) {
		nCups++;
		cupNumber = nCups;
		flavor = f;
	}
	
	public static void main(String[] args) {
		CoffeeCup.logo = "abc, inc.";
		
		CoffeeCup cup1 = new CoffeeCup("Mocha Java");
		
		CoffeeCup cup2 = new CoffeeCup("Cappuccino");
		
		CoffeeCup cup3 = new CoffeeCup("Creamy Chocolate");
		
		System.out.println("Company : " + CoffeeCup.logo);
		System.out.println("No of Cups : " + CoffeeCup.nCups);
		
		print(cup1);
		print(cup2);
		print(cup3);

	}
	
	static void print(CoffeeCup cup){
		
		System.out.println("Cup # " + cup.cupNumber);
		System.out.println("Flavor : " + cup.flavor);
		
	}
}
